Delivered-To: dirakx@gmail.com Received: by 10.216.203.201 with SMTP id f51csp157443weo; Mon, 29 Oct 2012 09:28:57 -0700 (PDT) Received: by 10.229.172.10 with SMTP id j10mr4535433qcz.97.1351528136584; Mon, 29 Oct 2012 09:28:56 -0700 (PDT) Return-Path: Received: from sunjammer.sugarlabs.org ([2001:4830:134:7::11]) by mx.google.com with ESMTP id l13si3106854qct.106.2012.10.29.09.28.54; Mon, 29 Oct 2012 09:28:56 -0700 (PDT) Received-SPF: neutral (google.com: 2001:4830:134:7::11 is neither permitted nor denied by best guess record for domain of sugar-devel-bounces@lists.sugarlabs.org) client-ip=2001:4830:134:7::11; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:4830:134:7::11 is neither permitted nor denied by best guess record for domain of sugar-devel-bounces@lists.sugarlabs.org) smtp.mail=sugar-devel-bounces@lists.sugarlabs.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from sunjammer.sugarlabs.org (localhost [127.0.0.1]) by sunjammer.sugarlabs.org (Postfix) with ESMTP id 8CC3C1207C1; Mon, 29 Oct 2012 12:28:52 -0400 (EDT) Received: from mail-gg0-f170.google.com (mail-gg0-f170.google.com [209.85.161.170]) by sunjammer.sugarlabs.org (Postfix) with ESMTPS id 3B2971207BA for ; Mon, 29 Oct 2012 12:28:44 -0400 (EDT) Received: by mail-gg0-f170.google.com with SMTP id q6so1007326ggc.29 for ; Mon, 29 Oct 2012 09:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=Tl9HWRlci2fx5ly+T/w/KiybW5Lplry1Gzbb6e/9Gyk=; b=FzDU3vhswJR5kySlOzionb/KOWic4TbkHdrTB+arxoG1bzvkdtVl2VgqnHyIb/Rb6Z JzcVWPsSBX1Lp5EH+E74ihoBcGlyv+JhiVf427eRV+PkgMoZ5zmnu7xtDAzOa2K/s9I6 StRL/whisudZid+ezHGjkPdhfyoR6Q8Xu/plP8NCU+LIVLpO5dAIgpyoFpPtZ3CKWwq5 C2tVp0ez3CYDh5xIX2VF4QBPdIpEAhy7CjD8Y+MBT5zTeLnjwHXODw5k+0PPqDf7YiVq wDf/zOPJIsPede5VPfFAjXhHaJ33lfKoid0QPgO4f4oxAXhPRsJf2vb7OIYiB6jej+YR eLeA== Received: by 10.236.47.41 with SMTP id s29mr8283441yhb.20.1351528123824; Mon, 29 Oct 2012 09:28:43 -0700 (PDT) Received: from michifus.humitos.dyndns.org (201-213-135-73.net.prima.net.ar. [201.213.135.73]) by mx.google.com with ESMTPS id s19sm8937181anh.17.2012.10.29.09.28.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Oct 2012 09:28:33 -0700 (PDT) From: Manuel Kaufmann To: rafael@activitycentral.com Date: Mon, 29 Oct 2012 13:28:23 -0300 Message-Id: <1351528103-12020-1-git-send-email-humitos@gmail.com> X-Mailer: git-send-email 1.7.11.7 X-Spam-Status: No, score=-0.7 required=3.5 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS, T_DKIM_INVALID autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sunjammer.sugarlabs.org X-Topics: Patches and patch reviews Cc: Manuel Kaufmann , sugar-devel@lists.sugarlabs.org Subject: [Sugar-devel] [PATCH Speak] Use radians instead of degrees X-BeenThere: sugar-devel@lists.sugarlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Discussion of Sugar development and other technical matters." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sugar-devel-bounces@lists.sugarlabs.org Errors-To: sugar-devel-bounces@lists.sugarlabs.org Cairo.Context.arc needs the angle in radians instead of degrees. Give it as 360 (radians) was taking up to 8 seconds to draw the eyes. Signed-off-by: Manuel Kaufmann --- eye.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eye.py b/eye.py index 954e68a..e1bf5b8 100644 --- a/eye.py +++ b/eye.py @@ -125,18 +125,20 @@ class Eye(gtk.DrawingArea): self.context.fill() # eye ball - self.context.arc(bounds.width / 2, bounds.height / 2, eyeSize / 2 - outlineWidth / 2, 0, 360) + self.context.arc(bounds.width / 2, bounds.height / 2, + eyeSize / 2 - outlineWidth / 2, 0, 2 * math.pi) self.context.set_source_rgb(1, 1, 1) self.context.fill() # outline self.context.set_line_width(outlineWidth) - self.context.arc(bounds.width / 2, bounds.height / 2, eyeSize / 2 - outlineWidth / 2, 0, 360) + self.context.arc(bounds.width / 2, bounds.height / 2, + eyeSize / 2 - outlineWidth / 2, 0, 2 * math.pi) self.context.set_source_rgb(0, 0, 0) self.context.stroke() # pupil - self.context.arc(pupilX, pupilY, pupilSize, 0, 360) + self.context.arc(pupilX, pupilY, pupilSize, 0, 2 * math.pi) self.context.set_source_rgb(0, 0, 0) self.context.fill() -- 1.7.11.7 _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel